﻿@{
    ViewBag.Title = "编辑用户信息";
}

@model  zqdn.Models.Auth.User

<div class="pageheader">
    <h2><i class="fa fa-user"></i>编辑用户信息</h2>
</div>
@using (Html.BeginForm("Edit", "User", new { id = Model.ID }, FormMethod.Post, new { name = "myform", id = "myform", @class = "form-horizontal form-bordered" }))
{
    @Html.HiddenFor(o => o.ID)
    @Html.HiddenFor(o => o.UserName)
    @Html.HiddenFor(o => o.PassWord)
    @Html.HiddenFor(o => o.Name)
    @Html.HiddenFor(o => o.Province)
    @Html.HiddenFor(o => o.City)
    @Html.HiddenFor(o => o.Hospital)
    @Html.HiddenFor(o => o.Mobile)
    @Html.HiddenFor(o => o.DoctorCertificate)

    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">@Html.DisplayNameFor(o => o.Mobile)</label>
        <div class="col-sm-6">
            <input type="text" id="disabledinput" class="form-control" disabled="" value="@Model.Mobile">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">@Html.DisplayNameFor(o => o.Province)</label>
        <div class="col-sm-6">
            <input type="text" id="disabledinput" class="form-control" disabled="" value="@ViewBag.ProvinceName">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">@Html.DisplayNameFor(o => o.City)</label>
        <div class="col-sm-6">
            <input type="text" id="disabledinput" class="form-control" disabled="" value="@ViewBag.CityName">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">@Html.DisplayNameFor(o => o.Hospital)</label>
        <div class="col-sm-6">
            <input type="text" id="disabledinput" class="form-control" disabled="" value="@ViewBag.HospitalName">
        </div>
    </div>
    if (Model.RoleID == 3) { 
    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">角色</label>
        <div class="col-sm-6">
            <select class="form-control" name="RoleID">
                <option value="2" @(Model.RoleID == 2 ? "selected" : "")>医生</option>
                <option value="3" @(Model.RoleID == 3 ? "selected" : "")>助手</option>
            </select>
        </div>
    </div>
      }
    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">@Html.DisplayNameFor(o => o.Deparment)</label>
        <div class="col-sm-6">
            <input type="text" id="disabledinput" class="form-control" name="Deparment" value="@Model.Deparment ">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">@Html.DisplayNameFor(o => o.DoctorOffice)</label>
        <div class="col-sm-6">
            <input type="text" id="disabledinput" class="form-control" name="DoctorOffice" value="@Model.DoctorOffice ">
        </div>
    </div>
    
    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">@Html.DisplayNameFor(o => o.Domain)</label>
        <div class="col-sm-6">
            <input type="text" id="disabledinput" class="form-control" name="Domain" value="@Model.Domain ">
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-3 control-label" for="disabledinput">修改密码：</label>
        <div class="col-sm-6">
            <input type="password" id="NewPassWord" name="NewPassWord" class="form-control">
        </div>
    </div>

    <div class="submit-footer">
        <button class="btn btn-primary" id="btnSave">提交</button>
    </div>
}